In [1]:
REF1_HASH_DEFAULT = 'b4ebd7576eab41248b4e0de0b92af558b144f5f6'
REF2_HASH_DEFAULT = '3ea1a395e6bacebaeacc165be5f51a236fb1674d'
In [2]:
import os
import pathlib
import shutil
import subprocess
import tempfile
from filecmp import dircmp
from pathlib import Path

import numpy as np
import pandas as pd
import plotly.graph_objects as go
from plotly.offline import init_notebook_mode
init_notebook_mode()
In [3]:
try:
    REF1_HASH = os.environ['REF1_HASH']

    if not REF1_HASH:
        raise ValueError

except (KeyError, ValueError):
    REF1_HASH = REF1_HASH_DEFAULT

try:
    REF2_HASH = os.environ['REF2_HASH']

    if not REF2_HASH:
        raise ValueError

except (KeyError, ValueError):
    REF2_HASH = REF2_HASH_DEFAULT
In [4]:
def highlight_missing(val):
    if val == True:
        return 'background-color: #BCF5A9'
    else:
        return 'background-color: #F5A9A9'
    
def highlight_relative_difference(val):
    ret = 'background-color: #BCF5A9'
    if val is None:
        ret = 'background-color: #BCF5A9'
    elif val > 1e-2:
        ret = 'background-color: #F2F5A9'
    elif val > 1e-1:
        ret = 'background-color: #F5D0A9'
    elif val > 1:
        ret = 'background-color: #F5A9A9'
    return ret
In [5]:
REF1_HASH, REF2_HASH
Out[5]:
('b4ebd7576eab41248b4e0de0b92af558b144f5f6',
 '3ea1a395e6bacebaeacc165be5f51a236fb1674d')
In [6]:
class ReferenceComparer(object):
    def __init__(self, ref1_hash=None, ref2_hash=None):
        assert not ((ref1_hash is None) and (ref2_hash is None)), "One hash can not be None"
        self.test_table_dict = {}
        self.ref1_hash = ref1_hash
        self.ref2_hash = ref2_hash
        self.compare_path = "tardis"
        self.tmp_dir = None
        self.setup()
        self.tmp_dir = Path(self.tmp_dir)
        self.ref1_path = self.tmp_dir / f"ref1_{self.compare_path}"
        self.ref2_path = self.tmp_dir / f"ref2_{self.compare_path}"
        self.dcmp = dircmp(self.ref1_path, self.ref2_path)
        self.print_diff_files(self.dcmp)
    
    def setup(self):
        self.tmp_dir = tempfile.mkdtemp()
        print('Created temporary directory at {0}. Delete after use with .teardown'.format(self.tmp_dir))
        
        for ref_id, ref_hash in enumerate([self.ref1_hash, self.ref2_hash]):
            ref_id += 1
            if ref_hash is not None:
                self._copy_data_from_hash(ref_hash, 'ref{0}_'.format(ref_id))
            else:
                subprocess.Popen('cp {0} {1}'.format(self.compare_path, 
                                                     os.path.join(self.tmp_dir, 
                                                                  'ref{0}_{1}'.format(ref_id, self.compare_path))), 
                                                     shell=True)
            setattr(self, 'ref{0}_fname'.format(ref_id), 
                    os.path.join(self.tmp_dir, 'ref{0}_{1}'.format(ref_id, self.compare_path)))

    def teardown(self):
        shutil.rmtree(self.tmp_dir)

    def _copy_data_from_hash(self, ref_hash, prefix):
        git_cmd = ['git']
        git_cmd.append('--work-tree={0}'.format(self.tmp_dir))
        git_cmd += ['checkout', ref_hash, self.compare_path]
        print(" ".join(git_cmd))
        p = subprocess.Popen(git_cmd)
        p.wait()
        shutil.move(os.path.join(self.tmp_dir, self.compare_path), 
                    os.path.join(self.tmp_dir, prefix + self.compare_path))

    def print_diff_files(self, dcmp):
        if isinstance(dcmp.right, pathlib.Path):
            dcmp.right = str(dcmp.right)
        if isinstance(dcmp.left, pathlib.Path):
            dcmp.left = str(dcmp.left)
            
        for item in dcmp.right_only:
            if Path(dcmp.right + "/" + item).is_file:
                print(f"new file detected at: {dcmp.right + '/' +item}")
                print(f"New file detected inside ref1: {item}")
                print(f"Path: {dcmp.right + '/' +item}")
                print()
        for item in dcmp.left_only:
            if Path(dcmp.left + "/" + item).is_file:
                print(f"New file detected inside ref2: {item}")
                print(f"Path: {dcmp.left + '/' +item}")
                print()
    
        for name in dcmp.diff_files:
            print(f"Modified file found {name}")
            left = dcmp.left.removeprefix(str(self.tmp_dir) + "/" + "ref1_tardis/")
            right = dcmp.right.removeprefix(str(self.tmp_dir) + "/" + "ref2_tardis/")
            if left==right:
                print(f"Path: {left}")
            if name.endswith(".h5"):
                self.test_table_dict[name] = {
                    "path": left
                }
                self.summarise_changes_hdf(name, str(dcmp.left), str(dcmp.right))
            print()
        for sub_dcmp in dcmp.subdirs.values():
            self.print_diff_files(sub_dcmp)
            
    def summarise_changes_hdf(self, name, path1, path2):
        ref1 = pd.HDFStore(path1 + "/"+ name)
        ref2 = pd.HDFStore(path2 + "/"+ name)
        k1 = set(ref1.keys())
        k2 = set(ref2.keys())
        print(f"Total number of keys- in ref1: {len(k1)}, in ref2: {len(k2)}")
        different_keys = len(k1^k2)
        print(f"Number of keys with different names in ref1 and ref2: {different_keys}")

        identical_items = []
        identical_name_different_data = []
        identical_name_different_data_dfs = {}
        for item in k1&k2:
            try:
                if ref2[item].equals(ref1[item]):
                    identical_items.append(item)
                else:
                    abs_diff = np.fabs(ref1[item] - ref2[item])
                    rel_diff = (abs_diff / np.fabs(ref1[item]))[ref1[item] != 0]
                    print(f"Displaying heatmap for key {item} in file {name}")
                    for diff_type, diff in zip(["abs", "rel"], [abs_diff, rel_diff]):
                        if "abs" in diff_type:
                            print("Visualising Absolute Differences")
                        else:
                            print("Visualising Relative Differences")
                        if isinstance(diff, pd.Series):
                            diff = pd.DataFrame([diff.mean(), diff.max()], index=['mean', 'max'])
                            display(diff)
                        else:
                            with pd.option_context('display.max_rows', 100, 'display.max_columns', 10):
                                if isinstance(diff.index, pd.core.indexes.multi.MultiIndex):
                                    diff = diff.reset_index(drop=True)
                                    diff = pd.DataFrame([diff.mean(), diff.max()], index=['mean', 'max'])
                                    display(diff.style.background_gradient(cmap='Reds'))
                                    
                                else:
                                    diff = pd.DataFrame([diff.mean(), diff.max()], index=['mean', 'max'])
                                    display(diff.style.background_gradient(cmap='Reds'))

                    identical_name_different_data.append(item)
                    identical_name_different_data_dfs[item] = rel_diff
                    print("\n")

            except Exception as e:
                print("Facing error comparing item: ", item)
                print(e)
                
        print(f"Number of keys with same name but different data in ref1 and ref2: {len(identical_name_different_data)}")
        print(f"Number of totally same keys: {len(identical_items)}")
        print()
        self.test_table_dict[name].update({
            "different_keys": different_keys,
            "identical_keys": len(identical_items),
            "identical_keys_diff_data": len(identical_name_different_data),
            "identical_name_different_data_dfs": identical_name_different_data_dfs
            
        })
        
In [7]:
rc = ReferenceComparer(REF1_HASH, REF2_HASH)
rc.teardown()
Created temporary directory at /var/folders/5r/hzj1v37d7nl3gpyk2kt94qb40000gn/T/tmp4qm3ioy0. Delete after use with .teardown
git --work-tree=/var/folders/5r/hzj1v37d7nl3gpyk2kt94qb40000gn/T/tmp4qm3ioy0 checkout b4ebd7576eab41248b4e0de0b92af558b144f5f6 tardis
Updated 81 paths from fc89854
git --work-tree=/var/folders/5r/hzj1v37d7nl3gpyk2kt94qb40000gn/T/tmp4qm3ioy0 checkout 3ea1a395e6bacebaeacc165be5f51a236fb1674d tardis
Updated 81 paths from c8ec28c
Modified file found test_montecarlo_main_loop.h5
Path: montecarlo/montecarlo_numba/tests/test_base
Total number of keys- in ref1: 77, in ref2: 83
Number of keys with different names in ref1 and ref2: 62
Displaying heatmap for key /simulation/plasma/number_density in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/simulation_state/density in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
0
mean 2.465190e-30
max 1.262177e-29
Visualising Relative Differences
0
mean 1.548990e-16
max 2.698381e-16

Displaying heatmap for key /simulation/plasma/tau_sobolevs in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/ion_number_density in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/iterations_electron_densities in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000001 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000001 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/level_number_density in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/density in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
0
mean 2.465190e-30
max 1.262177e-29
Visualising Relative Differences
0
mean 1.548990e-16
max 2.698381e-16

Displaying heatmap for key /simulation/plasma/transition_probabilities in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/electron_densities in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
0
mean 1.061708e-07
max 9.536743e-07
Visualising Relative Differences
0
mean 1.593295e-16
max 4.618070e-16

Displaying heatmap for key /simulation/plasma/beta_sobolev in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/stimulated_emission_factor in file test_montecarlo_main_loop.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Number of keys with same name but different data in ref1 and ref2: 11
Number of totally same keys: 38


Modified file found test_montecarlo_main_loop_vpacket_log.h5
Path: montecarlo/montecarlo_numba/tests/test_base
Total number of keys- in ref1: 86, in ref2: 92
Number of keys with different names in ref1 and ref2: 80
Displaying heatmap for key /simulation/plasma/number_density in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/simulation_state/density in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
0
mean 2.465190e-30
max 1.262177e-29
Visualising Relative Differences
0
mean 1.548990e-16
max 2.698381e-16

Displaying heatmap for key /simulation/plasma/tau_sobolevs in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/ion_number_density in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/iterations_electron_densities in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000001 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000001 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/level_number_density in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/density in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
0
mean 2.465190e-30
max 1.262177e-29
Visualising Relative Differences
0
mean 1.548990e-16
max 2.698381e-16

Displaying heatmap for key /simulation/plasma/transition_probabilities in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/electron_densities in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
0
mean 1.061708e-07
max 9.536743e-07
Visualising Relative Differences
0
mean 1.593295e-16
max 4.618070e-16

Displaying heatmap for key /simulation/plasma/beta_sobolev in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/stimulated_emission_factor in file test_montecarlo_main_loop_vpacket_log.h5
Visualising Absolute Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Number of keys with same name but different data in ref1 and ref2: 11
Number of totally same keys: 38


Modified file found test_montecarlo_continuum.h5
Path: montecarlo/montecarlo_numba/tests/test_continuum
Total number of keys- in ref1: 144, in ref2: 150
Number of keys with different names in ref1 and ref2: 6
Displaying heatmap for key /simulation/plasma/number_density in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000003 0.000001 0.000000 0.000000 0.000000
max 0.000008 0.000002 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/p_fb_deactivation in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/cool_rate_fb in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/transport/transport_state/spectrum/luminosity_density_lambda in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 2.073369e+30
max 1.403543e+34
Visualising Relative Differences
0
mean 4.267222e-16
max 2.971144e-14

Displaying heatmap for key /simulation/plasma/deactivation_channel_probs in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  lines_idx transition_type 0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  lines_idx transition_type 0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/level_absorption_probs in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  transition_type lines_idx 0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  transition_type lines_idx 0 1 2 3 4
mean 0.000000 0.000000 0.012080 0.009314 0.000000 0.000328 0.000000
max 0.000000 0.000000 2.000000 1.500000 0.000000 0.333333 0.000000

Displaying heatmap for key /simulation/plasma/non_continuum_trans_probs in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  lines_idx transition_type 0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  lines_idx transition_type 0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

Facing error comparing item:  /simulation/plasma/get_current_bound_free_continua
issubclass() arg 1 must be a class
Displaying heatmap for key /simulation/plasma/p_rad_bb in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/transport/transport_state/packet_luminosity in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 3.548197e+24
max 8.704266e+25
Visualising Relative Differences
0
mean 3.169363e-16
max 8.310808e-15

Displaying heatmap for key /simulation/plasma/stimulated_emission_factor in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/cool_rate_fb_tot in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/p_coll_recomb in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/p_coll in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/ion_number_density in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000008 0.000001 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Facing error comparing item:  /simulation/transport/transport_state/scalars
loop of ufunc does not support argument 0 of type numpy.float64 which has no callable fabs method
Displaying heatmap for key /simulation/transport/transport_state/spectrum_reabsorbed/luminosity_density_lambda in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 1.542477e+30
max 8.680871e+33
Visualising Relative Differences
0
mean 1.785492e-16
max 5.422534e-14

Displaying heatmap for key /simulation/plasma/density in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 3.362520e-30
max 1.262177e-29
Visualising Relative Differences
0
mean 1.825467e-16
max 2.141522e-16

Displaying heatmap for key /simulation/plasma/R in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.012056 0.009295 0.000000 0.000328 0.000000
max 2.000000 1.500000 0.000000 0.333333 0.000000

Displaying heatmap for key /simulation/plasma/p_photo_ion in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Facing error comparing item:  /simulation/plasma/determine_continuum_macro_activation_idx
too many values to unpack (expected 2)
Displaying heatmap for key /simulation/plasma/cool_rate_adiabatic in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/transport/transport_state/spectrum/luminosity in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 9.477978e+22
max 3.094850e+26
Visualising Relative Differences
0
mean 4.288796e-16
max 2.954954e-14

Displaying heatmap for key /simulation/plasma/chi_bf in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/simulation_state/density in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 3.362520e-30
max 1.262177e-29
Visualising Relative Differences
0
mean 1.825467e-16
max 2.141522e-16

Displaying heatmap for key /simulation/plasma/gamma_corr in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/cool_rate_ff in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/tau_sobolevs in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/transport/transport_state/nu_bar_estimator in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 6.869749e+14
max 2.533275e+15
Visualising Relative Differences
0
mean 3.405674e-15
max 6.320122e-15

Displaying heatmap for key /simulation/iterations_electron_densities in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000008 0.000002 0.000000 0.000000 0.000000
max 0.000008 0.000002 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/transport/transport_state/output_nu in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 0.250867
max 8.750000
Visualising Relative Differences
0
mean 2.615632e-16
max 6.955324e-15

Displaying heatmap for key /simulation/plasma/p_combined in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/ff_cooling_factor in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 110096.0
max 524288.0
Visualising Relative Differences
0
mean 3.229092e-16
max 3.815073e-16

Displaying heatmap for key /simulation/transport/transport_state/last_interaction_in_nu in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 0.077297
max 8.000000
Visualising Relative Differences
0
mean 2.372121e-16
max 3.745860e-15

Displaying heatmap for key /simulation/plasma/fb_emission_cdf in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/non_markov_transition_probabilities in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/level_number_density in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000008 0.000001 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/transition_probabilities in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.010772 0.008305 0.000000 0.000293 0.000000
max 2.000000 1.500000 0.000000 0.333333 0.000000

Facing error comparing item:  /simulation/plasma/determine_bf_macro_activation_idx
issubclass() arg 1 must be a class
Displaying heatmap for key /simulation/plasma/electron_densities in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 0.000002
max 0.000008
Visualising Relative Differences
0
mean 1.996747e-16
max 2.342458e-16

Displaying heatmap for key /simulation/plasma/beta_sobolev in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Facing error comparing item:  /simulation/plasma/yg_interp
unsupported operand type(s) for -: 'PchipInterpolator' and 'PchipInterpolator'
Displaying heatmap for key /simulation/plasma/p_deactivation in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/transport/transport_state/spectrum_reabsorbed/luminosity in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 1.547425e+23
max 6.189700e+26
Visualising Relative Differences
0
mean 1.777162e-16
max 5.417782e-14

Displaying heatmap for key /simulation/transport/transport_state/output_energy in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 3.060703e-19
max 7.589415e-18
Visualising Relative Differences
0
mean 3.156775e-16
max 8.367860e-15

Displaying heatmap for key /simulation/plasma/B in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.012080 0.009314 0.000000 0.000328 0.000000
max 2.000000 1.500000 0.000000 0.333333 0.000000

Displaying heatmap for key /simulation/transport/transport_state/j_estimator in file test_montecarlo_continuum.h5
Visualising Absolute Differences
0
mean 0.498437
max 2.062500
Visualising Relative Differences
0
mean 2.133455e-15
max 5.014080e-15

Displaying heatmap for key /simulation/plasma/lte_level_number_density in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/N in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/cool_rate_coll_ion in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Displaying heatmap for key /simulation/plasma/p_coll_ion in file test_montecarlo_continuum.h5
Visualising Absolute Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000
Visualising Relative Differences
  0 1 2 3 4
mean 0.000000 0.000000 0.000000 0.000000 0.000000
max 0.000000 0.000000 0.000000 0.000000 0.000000

Number of keys with same name but different data in ref1 and ref2: 46
Number of totally same keys: 93


Modified file found plasma_unittest_disable_electron_scattering_False.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_disable_electron_scattering_True.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_excitation_dilute-lte.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_excitation_lte.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_helium_treatment_recomb-nlte.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 43, in ref2: 43
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 43


Modified file found plasma_unittest_helium_treatment_recomb-nlte_delta_treatment_0.5.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 43, in ref2: 43
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 43


Modified file found plasma_unittest_initial_t_inner_10000 K.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_initial_t_rad_10000 K.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_ionization_lte.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_ionization_nebular.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 41, in ref2: 41
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 41


Modified file found plasma_unittest_line_interaction_type_downbranch.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_line_interaction_type_macroatom.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_line_interaction_type_scatter.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 35, in ref2: 35
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 35


Modified file found plasma_unittest_nlte.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 40, in ref2: 40
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 40


Modified file found plasma_unittest_nlte_classical_nebular.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 40, in ref2: 40
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 40


Modified file found plasma_unittest_nlte_coronal_approximation.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 40, in ref2: 40
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 40


Modified file found plasma_unittest_radiative_rates_type_blackbody.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found plasma_unittest_radiative_rates_type_detailed.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 42, in ref2: 42
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 42


Modified file found plasma_unittest_radiative_rates_type_detailed_w_epsilon_1e-10.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 42, in ref2: 42
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 42


Modified file found plasma_unittest_radiative_rates_type_dilute-blackbody.h5
Path: plasma/tests/test_complete_plasmas/test_plasma
Total number of keys- in ref1: 38, in ref2: 38
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 38


Modified file found test_collection__density__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_levels.h5
Path: plasma/tests/test_hdf_plasma
Total number of keys- in ref1: 1, in ref2: 1
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 1


Modified file found test_hdf_plasma__beta_sobolev__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__density__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__electron_densities__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__ion_number_density__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__level_number_density__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__number_density__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__stimulated_emission_factor__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__tau_sobolevs__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_hdf_plasma__transition_probabilities__.npy
Path: plasma/tests/test_hdf_plasma

Modified file found test_isotope_number_densities.h5
Path: plasma/tests/test_tardis_model_density_config
Total number of keys- in ref1: 1, in ref2: 1
Number of keys with different names in ref1 and ref2: 0
Number of keys with same name but different data in ref1 and ref2: 0
Number of totally same keys: 1


In [8]:
data = [
    {
        "file": k,
        "different_keys": v["different_keys"],
        "identical_keys": v["identical_keys"],
        "identical_keys_diff_data": v["identical_keys_diff_data"],
    }
    for k, v in rc.test_table_dict.items()
]

bar_traces = [
    {"y": [d["different_keys"] for d in data], 
     "name": "Different Keys",
     "marker_color": "steelblue"},
    {"y": [d["identical_keys"] for d in data],
     "name": "Identical Keys",
     "marker_color": "#2e7514"}, 
    {"y": [d["identical_keys_diff_data"] for d in data],
     "name": "Identical Keys (Diff Data)",
     "marker_color": "firebrick"}
]

fig = go.Figure()
x_values = [d["file"] for d in data]

for trace in bar_traces:
    fig.add_trace(go.Bar(x=x_values, **trace))

# Customize the layout
fig.update_layout(
    barmode="stack",
    title="File Comparison Metrics",
    xaxis_title="File",
    yaxis_title="Value",
    xaxis_tickangle=-45,
)

fig.update_xaxes(showticklabels=False)
fig.show()
In [ ]: